package com.qijian.common.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

@Getter
@AllArgsConstructor
public enum FlowableCommonEnum {

    flow_re_eq("flow_re_eq", "生产资源(设备)"),
    flow_re_eq_c("flow_re_eq_c", "生产资源(设备)"),

    flow_re_gz("flow_re_gz", "生产资源(工装)"),

    flow_re_gz_c("flow_re_gz_c", "生产资源(工装)"),

    flow_re_eq_bf("flow_re_eq_bf", "生产资源报废(设备)"),
    flow_re_gz_bf("flow_re_gz_bf", "生产资源报废(工装)"),

    flow_re_knife_pick("flow_re_knife_pick", "刀具领料"),

    flow_re_knife_return("flow_re_knife_return", "刀具退库"),

    flow_re_knife_sale("flow_re_knife_sale", "刀具销售出库"),

    flow_re_knife_transfer("flow_re_knife_transfer ", "刀具借用表单"),

    flow_order_de_ex("flow_order_de_ex ", "工单定额异常"),

    flow_process_performance("flow_process_performance", "工装部工艺派工流程"),
    flow_quality_craft_dispatch("flow_quality_craft_dispatch", "质量派工流程"),

    flow_process_craft_dispatch("flow_process_craft_dispatch", "工艺部工艺派工流程"),

    flow_fin_finance_dispatch("flow_fin_finance_dispatch", "财务派工流程"),

    flow_adjustOrder("flow_adjustOrder", "核算派工流程"),

    flow_fin_cost_ex("flow_fin_cost_ex", "成本异常流程"),
    flow_re_knife_move("flow_re_knife_move", "刀具移库流程"),
    purm_supplier_retrial("purm_supplier_retrial", "供应商复审流程"),
    ;

    @EnumValue
    private final String value;

    @JsonValue
    private final String description;

    private static final Map<String, String> ENUM_FLOW_COMMON_MAP = new HashMap<>();

    static {
        for (FlowableCommonEnum item : values()) {
            ENUM_FLOW_COMMON_MAP.put(item.getValue(), item.getDescription());
        }
    }

    public static String flowToValues(String value) {
        return ENUM_FLOW_COMMON_MAP.get(value);
    }


}
